﻿using EasyCaching.Core;
using System;
using System.Collections.Generic;
using System.Text;

namespace Helpers
{
    public static class EasyCachingHelper
    {
        /// <summary>
        /// 默认的内存缓存
        /// </summary>
        public static IEasyCachingProvider InMemoryCache => DiHelper.GetRequiredService<IEasyCachingProviderFactory>().GetCachingProvider(EasyCachingConstValue.DefaultInMemoryName);
        /// <summary>
        /// 默认的sqlite缓存
        /// </summary>
        public static IEasyCachingProvider SQLiteCache => DiHelper.GetRequiredService<IEasyCachingProviderFactory>().GetCachingProvider(EasyCachingConstValue.DefaultSQLiteName);
        /// <summary>
        /// 默认的csredis缓存
        /// </summary>
        public static IEasyCachingProvider CSRedisCache => DiHelper.GetRequiredService<IEasyCachingProviderFactory>().GetCachingProvider(EasyCachingConstValue.DefaultCSRedisName);
    }
}
